package cn.jiyun.controller;

import cn.jiyun.feign.ContestFeign;
import cn.jiyun.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 季乾帅
 * @create 2023/8/23 10:59
 */
@RestController
@Slf4j
@RequestMapping("/con")
public class ConsumerController {

    @Autowired
    private ContestFeign contestFeign;

    @GetMapping("/findContest")
    public Result findContest(Integer id) {
        return contestFeign.findContests(id);
    }

    @GetMapping("/findJings")
    public Result findJs(Integer id) {
        return contestFeign.findJingSai(id);
    }

    @RequestMapping("/Dz")
    public Result dainZhan(Integer ss, Integer id) {
        return contestFeign.dainZhan(ss, id);
    }

    @GetMapping("/findTest")
    public Result findTest(Integer id) {
        return contestFeign.findTest(id);
    }

    @GetMapping("/findPx")
    public Result findPx() {
        return contestFeign.findPx();
    }
}
